package com.example.demo.service;

import com.example.demo.entity.Team;
import com.example.demo.repository.TeamRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

public interface TeamService {


    // 获取所有球队
    public List<Team> getAllTeams();

    // 根据ID获取球队
    public Optional<Team> getTeamById(Long id) ;

    // 新增或更新球队
    public Team saveTeam(Team team);

    // 删除球队
    public void deleteTeamById(Long id);
}